using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace SmartLauncher
{
	public partial class BugReportDialog : Form
	{
		public BugReportDialog(BugReportManager report)
		{
			InitializeComponent();

			label1.Text = string.Format(label1.Text, Application.ProductName);
			txtReport.Text = report.Report;
			Height = 600 - txtReport.Height;

			if ((Properties.Settings.Default.SendBugReport == true) && (report.Exception != null))
			{
				Text = "Send a bug report";
				label2.Text = "In order to fix the problem, an error report will be sent to your IT helpdesk. This report contains the following information:";
				btOK.Text = "Send";
			}
			else
			{
				Text = "Report a bug";
				label2.Text = "In order to fix the problem, You should send this error report to your IT helpdesk:";
				btOK.Text = "Close";
			}

		}

		private void btExpand_Click(object sender, EventArgs e)
		{
			if (btExpand.Text == ">>")
			{
				Height = 600;
				CenterToScreen();
				btExpand.Text = "<<";
			}
			else
			{
				Height = 600 - txtReport.Height;
				CenterToScreen();
				btExpand.Text = ">>";
			}
		}
	}
}